/** 最外层容器 */
.ew-tree-table {
    margin: 10px 0;
    position: relative;
    border: 1px solid #e6e6e6;
    border-bottom: none;
    border-right: none;
}

.ew-tree-table:before, .ew-tree-table:after, .ew-tree-table .ew-tree-table-head:after {
    content: "";
    background-color: #e6e6e6;
    position: absolute;
    right: 0;
    bottom: 0;
}

.ew-tree-table:before {
    width: 1px;
    top: 0;
    z-index: 1;
}

.ew-tree-table:after, .ew-tree-table .ew-tree-table-head:after {
    height: 1px;
    left: 0;
}

.ew-tree-table .layui-table {
    margin: 0;
    position: relative;
    table-layout: fixed;
}

/** 表格 */
.ew-tree-table .layui-table td, .ew-tree-table .layui-table th {
    border-top: none;
    border-left: none;
    padding: 0 !important;
}

.ew-tree-table .ew-tree-table-box {
    overflow: auto;
    position: relative;
}

.ew-tree-table .ew-tree-table-head {
    overflow: hidden;
    box-sizing: border-box;
    background-color: #f2f2f2;
    position: relative;
}

/** loading */
.ew-tree-table .ew-tree-table-loading {
    padding: 10px 0;
    text-align: center;
}

.ew-tree-table .ew-tree-table-loading > i {
    color: #999;
    font-size: 30px;
}

.ew-tree-table .ew-tree-table-loading.ew-loading-float {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
}

/** 空数据 */
.ew-tree-table .ew-tree-table-empty {
    color: #666;
    font-size: 14px;
    padding: 18px 0;
    text-align: center;
    display: none;
}

/** 单元格 */
.ew-tree-table-cell.ew-tree-tips-open {
    position: absolute;
    top: 0;
    left: 0;
    padding: 0;
    z-index: 19891015;
    background-color: #fff;
    box-shadow: 3px 3px 8px rgba(0, 0, 0, .15);
}

thead .ew-tree-table-cell.ew-tree-tips-open {
    background-color: #f2f2f2;
}

.ew-tree-table-cell.ew-tree-tips-open.ew-show-left {
    right: 0;
    left: auto;
    box-shadow: -3px 3px 8px rgba(0, 0, 0, .15);
}

.ew-tree-table-cell.ew-tree-tips-open.ew-show-bottom {
    bottom: 0;
    top: auto;
    box-shadow: 3px -3px 8px rgba(0, 0, 0, .15);
}

.ew-tree-table-cell.ew-tree-tips-open.ew-show-left.ew-show-bottom {
    box-shadow: -3px -3px 8px rgba(0, 0, 0, .15);
}

.ew-tree-table-cell > .ew-tree-tips-c {
    position: absolute;
    right: -6px;
    top: -3px;
    width: 22px;
    height: 22px;
    line-height: 22px;
    font-size: 16px;
    color: #fff;
    background-color: #666;
    border-radius: 50%;
    text-align: center;
    cursor: pointer;
    display: none;
}

table tr:first-child .ew-tree-table-cell > .ew-tree-tips-c {
    top: 0;
}

.ew-tree-table-cell.ew-tree-tips-open > .ew-tree-tips-c {
    display: block;
}

.ew-tree-table-cell.ew-tree-tips-open.ew-show-left > .ew-tree-tips-c {
    left: -6px;
    right: auto;
}

.ew-tree-table-cell > .ew-tree-table-cell-content {
    padding: 5px 15px;
    line-height: 28px;
}

[lay-size="lg"] .ew-tree-table-cell > .ew-tree-table-cell-content {
    line-height: 40px;
}

[lay-size="sm"] .ew-tree-table-cell > .ew-tree-table-cell-content {
    padding: 1px 15px;
}

.ew-tree-table-cell.single-line > .ew-tree-table-cell-content {
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.ew-tree-table-cell.ew-tree-tips-open > .ew-tree-table-cell-content {
    overflow: auto;
    padding: 9px 15px;
    height: auto;
    min-height: 100%;
    max-height: 110px;
    line-height: inherit;
    max-width: 260px;
    width: 200px;
    width: max-content;
    width: -moz-max-content;
    box-sizing: border-box;
    white-space: normal;
}

.ew-tree-table-cell > .layui-table-grid-down {
    box-sizing: border-box;
}

/** 图标列 */
.ew-tree-table .ew-tree-pack {
    cursor: pointer;
    line-height: 16px;
}

.ew-tree-table .ew-tree-pack > .layui-icon, .ew-tree-table .ew-tree-pack > .ew-tree-icon {
    margin-right: 5px;
}

.ew-tree-table .ew-tree-pack > * {
    vertical-align: middle;
}

/* 缩进 */
.ew-tree-table .ew-tree-table-indent {
    margin-right: 5px;
    padding-left: 16px;
}

/* 箭头 */
.ew-tree-table .ew-tree-table-arrow:before {
    content: "\e623";
}

.ew-tree-table .ew-tree-table-open .ew-tree-table-arrow:before {
    content: "\e625";
}

.ew-tree-table .ew-tree-table-arrow.arrow2 {
    font-size: 12px;
    font-weight: 600;
    line-height: 16px;
    height: 16px;
    width: 16px;
    display: inline-block;
    text-align: center;
    color: #888;
}

.ew-tree-table .ew-tree-table-arrow.arrow2:before {
    content: "\e602";
}

.ew-tree-table .ew-tree-table-open .ew-tree-table-arrow.arrow2:before {
    content: "\e61a";
}

.ew-tree-table-arrow.ew-tree-table-arrow-hide {
    visibility: hidden;
}

/* 箭头变加载中状态 */
.ew-tree-table .ew-tree-table-loading > td .ew-tree-table-arrow:before {
    content: "\e63d" !important;
}

.ew-tree-table .ew-tree-table-loading > td .ew-tree-table-arrow {
    margin-right: 0;
}

.ew-tree-table .ew-tree-table-loading > td .ew-tree-table-arrow + * {
    margin-left: 5px;
}

.ew-tree-table .ew-tree-table-loading * {
    pointer-events: none !important;
}

/** 折叠行 */
.ew-tree-table .ew-tree-tb-hide {
    display: none;
}

/** 特殊列调整 */
.ew-tree-table td[data-type="numbers"] > .ew-tree-table-cell,
.ew-tree-table th[data-type="numbers"] > .ew-tree-table-cell,
.ew-tree-table td[data-type="checkbox"] > .ew-tree-table-cell,
.ew-tree-table th[data-type="checkbox"] > .ew-tree-table-cell,
.ew-tree-table td[data-type="radio"] > .ew-tree-table-cell,
.ew-tree-table th[data-type="radio"] > .ew-tree-table-cell,
.ew-tree-table td[data-type="space"] > .ew-tree-table-cell,
.ew-tree-table th[data-type="space"] > .ew-tree-table-cell {
    padding-left: 0;
    padding-right: 0;
}

/* 单元格内表单元素样式调整 */
.ew-tree-table .layui-form-switch,
.ew-tree-table .layui-form-radio {
    margin: 0;
}

/* checkbox列调整 */
.ew-tree-table-checkbox + .layui-form-checkbox {
    padding: 0;
}

.ew-tree-table-checkbox + .layui-form-checkbox > .layui-icon {
    font-weight: 600;
    color: transparent;
    transition: background-color .1s linear;
    -webkit-transition: background-color .1s linear;
}

.ew-tree-table-checkbox + .layui-form-checkbox.layui-form-checked > .layui-icon {
    color: #fff;
}

/* checkbox半选状态 */
.ew-form-indeterminate + .layui-form-checkbox .layui-icon:before {
    content: "";
    width: 10px;
    height: 2px;
    background-color: #f1f1f1;
    position: absolute;
    top: 50%;
    left: 50%;
    margin: -1px 0 0 -5px;
}

/* radio列调整 */
.ew-tree-table-radio + .layui-form-radio {
    padding: 0;
    height: 20px;
    line-height: 20px;
}

.ew-tree-table-radio + .layui-form-radio > i {
    margin: 0;
    height: 20px;
    font-size: 20px;
    line-height: 20px;
}

/** 单元格编辑 */
.ew-tree-table .layui-table td[data-edit] {
    cursor: text;
}

.ew-tree-table .ew-tree-table-edit {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    border-radius: 0;
    box-shadow: 1px 1px 20px rgba(0, 0, 0, .15);
}

.ew-tree-table .ew-tree-table-edit:focus {
    border-color: #5FB878 !important;
}

.ew-tree-table .ew-tree-table-edit.layui-form-danger {
    border-color: #FF5722 !important;
}

/** 搜索数据隐藏行 */
.ew-tree-table tr.ew-tree-table-filter-hide {
    display: none !important;
}

/** 头部工具栏 */
.ew-tree-table .ew-tree-table-tool {
    min-height: 50px;
    line-height: 30px;
    padding: 10px 15px;
    box-sizing: border-box;
    background-color: #f2f2f2;
    border-bottom: 1px solid #e6e6e6;
}

.ew-tree-table .ew-tree-table-tool .ew-tree-table-tool-right {
    float: right;
}

.ew-tree-table .ew-tree-table-tool .ew-tree-table-tool-item {
    position: relative;
    color: #333;
    width: 26px;
    height: 26px;
    line-height: 26px;
    text-align: center;
    margin-left: 10px;
    display: inline-block;
    border: 1px solid #ccc;
    box-sizing: border-box;
    vertical-align: middle;
    -webkit-transition: .3s all;
    transition: .3s all;
    cursor: pointer;
}

.ew-tree-table .ew-tree-table-tool .ew-tree-table-tool-item:first-child {
    margin-left: 0;
}

.ew-tree-table .ew-tree-table-tool .ew-tree-table-tool-item:hover {
    border-color: #999;
}

.ew-tree-table .ew-tree-table-tool-right .layui-table-tool-panel {
    left: auto;
    right: -1px;
    z-index: 9999;
}

/* 列宽拖拽调整 */
.ew-tree-table .ew-tb-resize {
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: 10px;
    cursor: col-resize;
}

.ew-tree-table-resizing {
    cursor: col-resize;
    -ms-user-select: none;
    -moz-user-select: none;
    -webkit-user-select: none;
    user-select: none;
}

/* 辅助样式 */
.ew-tree-table .layui-form-switch {
    margin: 0;
}

.ew-tree-table .pd-tb-0 {
    padding-top: 0 !important;
    padding-bottom: 0 !important;
}

.ew-tree-table .break-all {
    word-break: break-all !important;
}

/** 扩展图标 */
.ew-tree-table .ew-tree-icon-folder:after, .ew-tree-table .ew-tree-icon-file:after {
    content: "";
    padding: 2px 10px;
    -webkit-background-size: cover;
    -moz-background-size: cover;
    -o-background-size: cover;
    background-size: cover;
    background-repeat: no-repeat;
    background-image: url("");
}

.ew-tree-table tr.ew-tree-table-open > td .ew-tree-icon-folder:after {
    background-image: url("")
}

.ew-tree-table .ew-tree-icon-file:after {
    background-image: url("")
}
